package org.streets.eis.ext.rbac.entities;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity @Table(name="EIS_ROLE_PERMISSIONS")
public class RolePermission  implements Serializable {
	private static final long serialVersionUID = 1L;
	
	@Id 
	public String id;
	@Column
	public String roleId;
	@Column
	public String permTarget;
	@Column
	public String targetValue;
	@Column
	public String displayText;
	@Column
	public Boolean incChild;
	@Column
	public String permValue;

	public RolePermission() {		
	}

	@Override
	public int hashCode(){
		return id.hashCode();
	}
	
	@Override
	public boolean equals(Object obj){
		return obj!=null&&(obj instanceof RolePermission)&&id.equals(((RolePermission)obj).id);
	}	
	
}
